Skip to content

feat: --color for recolourable illustrations; the More: line keeps your filters; buy's default tier said right - #4

Merged
pmithunish merged 1 commit into
mainfrom
fix/notes-and-color
Nov 5, 2026
Merged

pmithunish merged 1 commit into
mainfrom
fix/notes-and-color

Conversation

@pmithunish

Copy link
Copy Markdown
Member

Three fixes found while rewriting the README, and --color for the recolourable illustrations the store shipped in pmithunish/the-stack#362. The store-side fixes (recommend's scoring, the buy note's voice) are pmithunish/the-stack#366.

--color <hex> (download, sync, and the local MCP server)

The contract is #362's get_download_links on the store's main: color takes hex, each recoloured SVG's link comes back named <name>-<rrggbb>.svg with the sha256 of the recoloured file and the same byte count, and the store refuses a colour for a product that isn't recolourable.

  • download <slug> --color 2f9e44 (or "#2f9e44", or #2f9): the hex is checked locally first (exit 2 before any request). The library's recolor decides whether the product can be recoloured. If it can't, the refusal is clear and exit 2: "Retro UI sound effects comes in its own colours and can't be recoloured; leave the colour out. Only recolourable products (the Illustrations shelf) take one."
  • Checksums use the store's recoloured hashes. Files are planned from the coloured links, so a second run skips what is already there. Every renewed link (after a 403/410) carries the colour; without that, the file would arrive as drawn and fail its checksum. --file hero.svg still matches, a coloured zip is <slug>-<rrggbb>.zip, and show says "Recolourable".
  • sync --color: recolourable products come in the colour and the rest as drawn. Their links are fetched before planning, because only the store knows a recoloured file's sha256. A --product that can't be recoloured is refused.
  • MCP: download_to_folder and the proxied get_download_links take color. Until now the local server's schema dropped the field.
  • Documented in --help, the README (download/sync and the tools table) and the skill, including that an unquoted # starts a shell comment.

The search More: hint dropped your filters

The hint was built from the positional words only (kadal-store search <words> --cursor N). The store's nextCursor is an offset into whatever list the call names. On the live catalogue, ordering is deterministic (every created_at is unique), so the store pages the same search correctly. The CLI was printing a different search. Following the hint for search --format png --limit 1 gave page 2 of everything. searchAgain() reads the tool arguments back into flags (--shelf --style --topic --format --kind --sort --limit --max, quoting where needed, plus --host when given). An integration test runs the printed line and gets the next PNG.

The default tier was described wrongly

The help, create_buy_link's tier description and the skill said standard (default). Without a tier, the store's quote() takes the cheapest licence on sale. All of them, and the README, now say so.

buy's note

The store's note was written for an agent ("until the person pays…"). #366 makes it second person. The README example now shows the new wording, which becomes real output once #366 deploys. render.ts's "say it once" check is unchanged and now tested against the old note, the new one, and a note that doesn't say it.

Verified

  • bun test: 74 pass (13 new). bun run lint and bun run typecheck are clean. bun run build and node tools/smoke.mjs pass under Node.
  • The fake store pages and filters search_products, and recolours like #362: same length, coloured names, recoloured sha256, refusals word for word. Before the fix, the new search test failed: More: kadal-store search --cursor 1.
  • Printed output checked in-process for search, show, download --color (twice: downloads, then skips), a refused colour, a bad hex and sync --color --dry-run.

Not verified against the live store: there is no sign-in on this machine, and the live catalogue has no Illustrations shelf yet.

Changeset: patch.

🤖 Generated with Claude Code

…ur filters; buy's default tier said right

--color <hex> on download and sync, and color on the local MCP server's download_to_folder and
get_download_links (the store's contract since the-stack #362). The hex is checked here first
(2f9e44, #2f9e44, #2f9; a usage error otherwise). A product whose library entry has no recolor is
refused before any links are asked for; sync recolours the recolourable products, brings the rest
as drawn, and refuses a --product that can't take a colour. The checksum is the one the store sends
for the recoloured bytes: download plans from those links, sync asks for each recolourable
product's links before planning so a second run skips files already there, every renewed link
carries the colour, --file still takes the file's own name, and a coloured zip is
<slug>-<rrggbb>.zip. `show` says when a product is recolourable.

search's "More:" hint was `kadal-store search <words> --cursor N`, built from the words alone. The
store's cursor is an offset into whatever list the call names, so following the hint without
--shelf, --format, --max… paged through a different list. It is now searchAgain(), the tool
arguments read back into flags (with --host), so the next page is of the same search.

Without a tier, buy gets the cheapest licence on sale (the store's quote()), not "standard". The
help, create_buy_link's tier description, the skill and the README now say so. The README's buy
example carries the store's new second-person note (the-stack #366), and render.ts's "said once"
check is tested against both versions of that note and against a note that doesn't say it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@pmithunish
pmithunish merged commit caba37e into main Nov 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant